// vite.config.js
import path from "path";
import { defineConfig, loadEnv } from "file:///C:/Users/ASUS/Desktop/xyt/xyt-web/node_modules/vite/dist/node/index.js";
import vue from "file:///C:/Users/ASUS/Desktop/xyt/xyt-web/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import components from "file:///C:/Users/ASUS/Desktop/xyt/xyt-web/node_modules/unplugin-vue-components/dist/vite.js";
import autoImport from "file:///C:/Users/ASUS/Desktop/xyt/xyt-web/node_modules/unplugin-auto-import/dist/vite.js";
import { VarletImportResolver } from "file:///C:/Users/ASUS/Desktop/xyt/xyt-web/node_modules/@varlet/import-resolver/lib/index.js";
var __vite_injected_original_dirname = "C:\\Users\\ASUS\\Desktop\\xyt\\xyt-web";
var vite_config_default = defineConfig(({ command, mode }) => {
  const env = loadEnv(mode, process.cwd(), "");
  return {
    root: "./",
    // 项目根目录（index.html 文件所在的位置）
    base: "/",
    // 开发或生产环境服务的公共基础路径
    envDir: "./config",
    // 用于加载 .env 文件的目录
    // 配置路径别名
    resolve: {
      alias: {
        "@": path.resolve(__vite_injected_original_dirname, "./src")
      }
    },
    define: {
      __APP_ENV__: JSON.stringify(env.APP_ENV)
      // 定义全局常量替换方式
    },
    server: {
      host: "0.0.0.0",
      port: 9277,
      open: true,
      // 自动打开浏览器
      proxy: {
        "/api": {
          target: "http://10.5.21.63:33001",
          changeOrigin: true,
          rewrite: (path2) => path2.replace(/^\/api/, "/api")
        }
      },
      hmr: true
      // 开启热更新
    },
    plugins: [
      vue(),
      components({
        resolvers: [VarletImportResolver()]
      }),
      autoImport({
        resolvers: [VarletImportResolver({ autoImport: true })]
      })
    ],
    // 打包时自动去除 console 和 debugger
    esbuild: {
      drop: env?.VITE_DROP_CONSOLE === "true" ? ["console", "debugger"] : []
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBb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